gpsbabel.git
4 years agoupdate gui/gpx.cc to use QStringView for Qt6. (#725)
tsteven4 [Tue, 28 Sep 2021 12:22:36 +0000 (06:22 -0600)]
update gui/gpx.cc to use QStringView for Qt6. (#725)

4 years agopass QStringViews by value, not const reference. (#724)
tsteven4 [Mon, 27 Sep 2021 19:56:00 +0000 (13:56 -0600)]
pass QStringViews by value, not const reference. (#724)

As recommended in the QStringView documentation.

4 years agofixes for #722, Mechanically remove QStringRef use for QStringView to help with Qt6...
tsteven4 [Mon, 27 Sep 2021 19:09:18 +0000 (13:09 -0600)]
fixes for #722, Mechanically remove QStringRef use for QStringView to help with Qt6. (#723)

* Fix typo in maggeo from search-and-replace work earlier.

* Revert startOfDate() calls to keep floor at 5.12.x to keep builders happy. :-/

* Explictly get QString from StringView in gpx for compat with older Qt builds.

Co-authored-by: Robert Lipe <robertlipe@gmail.com>
4 years agoMechanically remove QStringRef use for QStringView to help with Qt6. (#722)
GPSBabel [Wed, 22 Sep 2021 04:16:30 +0000 (23:16 -0500)]
Mechanically remove QStringRef use for QStringView to help with Qt6. (#722)

* Make more string literals encoded at UTF-16 (bloaty-bytes) to
reduce conversions.
* Favor QStringView(Qt6-ism that mirrors C++ standard std::stringview)
over QStringRef (Qt5 hack).

Co-authored-by: Robert Lipe <robertlipe@gmail.com>
4 years agodon't limit simplify count maximum in GUI (#721)
tsteven4 [Mon, 20 Sep 2021 16:18:40 +0000 (10:18 -0600)]
don't limit simplify count maximum in GUI (#721)

4 years agoRemove Bushnell and Bushnell_trl formats.
Robert Lipe [Mon, 13 Sep 2021 22:32:51 +0000 (17:32 -0500)]
Remove Bushnell and Bushnell_trl formats.
These were added in 2009 when Onix unit were on firesale at places like Woot
as Bushnell had just exited the handheld GPS space. There was a flurry of
activity by a low number of users, followed by years of silence beyond
maintenance burden.

4 years agofix map preview bug that dropped tracks with 2 pts. (#714)
tsteven4 [Wed, 19 May 2021 20:58:23 +0000 (14:58 -0600)]
fix map preview bug that dropped tracks with 2 pts. (#714)

4 years agoadd fedora 34 to CI (#713)
tsteven4 [Sun, 9 May 2021 18:34:42 +0000 (12:34 -0600)]
add fedora 34 to CI (#713)

4 years agoMinorfixes to "new" gtm_stringread() functions to eliminate leading and trailing...
Robert Lipe [Sat, 17 Apr 2021 01:15:29 +0000 (20:15 -0500)]
Minorfixes to "new" gtm_stringread() functions to eliminate leading and trailing spaces (#710)

* Trim more uses of C date and potentially unsafe memory practices.

* Add warning fixes for garmin_xt and exif

5 years agoMerge pull request #664 from GPSBabel/reaper
Robert Lipe [Thu, 15 Apr 2021 23:21:39 +0000 (18:21 -0500)]
Merge pull request #664 from GPSBabel/reaper

Remove dead formats: alan, an1, netstumbler, naviguide.

5 years agorestore lost format options when using positional parameters (#709)
tsteven4 [Tue, 13 Apr 2021 17:33:53 +0000 (11:33 -0600)]
restore lost format options when using positional parameters (#709)

* restore format options with positional parameters.

* fix positional test

5 years agoMerge pull request #707 from GPSBabel/pvs
tsteven4 [Mon, 29 Mar 2021 14:09:22 +0000 (08:09 -0600)]
Merge pull request #707 from GPSBabel/pvs

PVS-Studio fixes

5 years agoBring back some of the files I nuked and move them to deprecated/
Robert Lipe [Mon, 29 Mar 2021 03:54:54 +0000 (22:54 -0500)]
Bring back some of the files I nuked and move them to deprecated/

5 years agofix some format mismatches found by PVS-Studio
tsteven4 [Wed, 24 Mar 2021 14:16:24 +0000 (08:16 -0600)]
fix some format mismatches found by PVS-Studio

V576 Incorrect format. Consider checking the second actual argument of the 'asprintf' function. The SIGNED integer type argument is expected.

QString::asprintf is not recommended for new code anyway.

5 years agofix erroneous Qt translation caught by PVS studio.
tsteven4 [Tue, 23 Mar 2021 18:58:39 +0000 (12:58 -0600)]
fix erroneous Qt translation caught by PVS studio.

V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.

This makes me wonder if this code is ever used.  If args == "OutputFromUnit"
it would throw a fatal error since b9cdbe4e8dc02cff07af9e0fa28adb2372337963 Oct 22, 2013

5 years agofix sequence related undefined behavior found by PVS Studio.
tsteven4 [Tue, 23 Mar 2021 18:40:06 +0000 (12:40 -0600)]
fix sequence related undefined behavior found by PVS Studio.

V567 The modification of the 's' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior.

5 years agopvs fix
tsteven4 [Tue, 23 Mar 2021 15:46:42 +0000 (09:46 -0600)]
pvs fix

V668 There is no sense in testing the 'wpt_tmp' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

5 years agofix another pvs warning
tsteven4 [Mon, 22 Mar 2021 17:53:18 +0000 (11:53 -0600)]
fix another pvs warning

V758 The 'pos' reference becomes invalid when temporary object returned by a function is destroyed.

5 years agofix ancient memory leak in filter_vecs. (#706)
tsteven4 [Sat, 20 Mar 2021 12:57:41 +0000 (06:57 -0600)]
fix ancient memory leak in filter_vecs. (#706)

5 years agoanother pvs studio find
tsteven4 [Fri, 19 Mar 2021 21:02:28 +0000 (15:02 -0600)]
another pvs studio find

↑ V547 Expression is always false.

5 years agoPVS Studio kills an old bug.
tsteven4 [Fri, 19 Mar 2021 14:53:45 +0000 (08:53 -0600)]
PVS Studio kills an old bug.

V1064 The '360' operand of integer division is less than the '65535' one. The result will always be zero.

Also, we need to set the flag for course.

5 years agomake some Qt containers const. (#705)
tsteven4 [Mon, 15 Mar 2021 20:32:54 +0000 (14:32 -0600)]
make some Qt containers const. (#705)

This avoids checks for detachment.

5 years agofix Qt6 deprecation warning in mapbar_track. (#703)
tsteven4 [Mon, 15 Mar 2021 13:04:10 +0000 (07:04 -0600)]
fix Qt6 deprecation warning in mapbar_track. (#703)

* fix Qt6 deprecation warning in mapbar_track.

"warning: 'fromUtf16' is deprecated: Use char16_t* overload."
However, it is recommended to use QString(const QChar *, int) or
QString(const QChar *) instead of
QString::fromUtf16(const ushort *unicode, int size = -1) and
QString::fromUtf16(const char16_t *str, int size = -1) anyway.

* fix Either the condition 'track==nullptr' is redundant or there is possible null pointer dereference.

as this isn't using a non-throwing allocation function memory allocation
errors will cause std::bad_alloc to be thrown anyway, we won't return
with track == nullptr.

* eliminate another non-functional memory check.

5 years agofix Wmissing-field-initializers. (#704)
tsteven4 [Mon, 15 Mar 2021 13:03:34 +0000 (07:03 -0600)]
fix Wmissing-field-initializers. (#704)

These appear with Qt6 on macos which enables Wextra.

5 years agouse default parameter instead of QString::KeepEmptyParts, (#702)
tsteven4 [Thu, 11 Mar 2021 20:44:35 +0000 (13:44 -0700)]
use default parameter instead of QString::KeepEmptyParts, (#702)

simplifying migration to Qt6.

5 years agoParse empty gx:coord elements in KML reader (#701)
Andreas Vögele [Mon, 8 Mar 2021 13:08:50 +0000 (14:08 +0100)]
Parse empty gx:coord elements in KML reader (#701)

Add test for empty gx:coord elements

5 years agomodernize nmea reader (#700)
tsteven4 [Thu, 4 Mar 2021 23:13:42 +0000 (16:13 -0700)]
modernize nmea reader (#700)

5 years agouse object tree to cleanup UpgradeCheck, UpgradeCheck::manager_ and (#692)
tsteven4 [Wed, 3 Mar 2021 20:35:49 +0000 (13:35 -0700)]
use object tree to cleanup UpgradeCheck, UpgradeCheck::manager_ and (#692)

UpgradeCheck::replyId.

5 years agoIntroduce RunMachine to manage gpsbabel process. (#699)
tsteven4 [Wed, 3 Mar 2021 16:53:39 +0000 (09:53 -0700)]
Introduce RunMachine to manage gpsbabel process. (#699)

* Introduce RunMachine to manage gpsbabel process.

* fix comment

* guard runmachine init state

5 years agofix gui usage of duplicate filter. (#695)
tsteven4 [Sun, 14 Feb 2021 20:36:57 +0000 (13:36 -0700)]
fix gui usage of duplicate filter. (#695)

the shortname and location options are not exclusive.

this resolves #686.

5 years agoremove a few old kludges that are no longer needed. (#691)
tsteven4 [Sat, 13 Feb 2021 16:09:58 +0000 (09:09 -0700)]
remove a few old kludges that are no longer needed. (#691)

* remove a few old kludges that are no longer needed.

* clean up upgrade a bit

"GPSBabel Version " doesn't need to be removed from currentVersionIn
in UpgradeCheck::checkForUpgrade,
that is taken care of in MainWindow::findBabelVersion

5 years agoupdate readme.md with current continuous integration provider (#672)
tsteven4 [Wed, 10 Feb 2021 19:54:26 +0000 (12:54 -0700)]
update readme.md with current continuous integration provider (#672)

* update README for new CI.

* use list for workflows

* appease codacy list item indent

* restore lost newline

* don't mention pre-releases in README.md

5 years agoremove leftover includes from autotools (#689)
tsteven4 [Wed, 10 Feb 2021 19:51:40 +0000 (12:51 -0700)]
remove leftover includes from autotools (#689)

* remove leftovers from autotools

we no longer have config.h, HAVE_CONFIG_H is always false.

* more config.h deletions (from jeeps)

5 years agomake src/core and jeeps includes relative to top cli directory (#688)
tsteven4 [Wed, 10 Feb 2021 19:26:28 +0000 (12:26 -0700)]
make src/core and jeeps includes relative to top cli directory (#688)

* make jeeps includes relative to cli diretory.

* make src/core includes all relative to top level src dir.

5 years agoprefer implicitly-defined dtors instead of user dtors with empty bodies. (#685)
tsteven4 [Sun, 7 Feb 2021 21:43:27 +0000 (14:43 -0700)]
prefer implicitly-defined dtors instead of user dtors with empty bodies. (#685)

Not only is this simpler, it avoids clang-tidy complaining about
warning: class * defines a non-default destructor but does not define a copy
constructor, a copy assignment operator, a move constructor or a move
assignment operator [cppcoreguidelines-special-member-functions]

5 years agocleanup FormatLoad class header file. (#684)
tsteven4 [Sat, 6 Feb 2021 21:29:11 +0000 (14:29 -0700)]
cleanup FormatLoad class header file. (#684)

clang-tidy modernize-use-default-member-init

This allows the use of the implicitly-defined default ctor.
Use implicitly-defined dtor as well.

5 years agofurther cleanups for Format class header. (#683)
tsteven4 [Sat, 6 Feb 2021 17:51:41 +0000 (10:51 -0700)]
further cleanups for Format class header. (#683)

manual fix for typedef found by clang-tidy modernize-use-using

clazy fixes for clazy-function-args-by-ref

clang-tidy fix for modernize-use-default-member-init

5 years agouse new style connect, i.e. function pointers (#682)
tsteven4 [Sat, 6 Feb 2021 13:55:00 +0000 (06:55 -0700)]
use new style connect, i.e. function pointers (#682)

* migrate from old style connects to the new style.

The changes using qOverload were done by hand, the rest were done
with clazy 1.9.

The ones using the TreeAction constructor were not found by clazy
and would require more manual intervention.

Also, I note uic generates old style connects.

* eliminate our TreeAction class in favor of QMenu::addAction method.

It is a mystery to me why we created TreeAction.  The QMenu method existed
in Qt 4.3.  Documentation before 4.3 is scarce.
QMenu::addAction(const QString &text, const QObject *receiver, const char *member, const QKeySequence &shortcut = 0)

* clazy updates gmapdlg connects.

* add TODOs for Qt6 related to qOverload.

5 years agodrop support for QtWebKit. (#680)
tsteven4 [Fri, 5 Feb 2021 17:01:41 +0000 (10:01 -0700)]
drop support for QtWebKit. (#680)

Our QtWebKit build didn't work any longer on Ubuntu bionic or focal,
but went into an infinite loop if map preview was used.
I observed this behavior with builds of 1.7.0 as well.

Document exisiting gui configuration option disable-mappreview.

I note that latest fedora build spec falls back to QtWebKit on some
architectures where QtWebEngine is not available.  This change will
require them to fall back to disabling the map preview instead.
https://src.fedoraproject.org/rpms/gpsbabel/blob/rawhide/f/gpsbabel.spec

QtWebEngine appears to be coming to Qt6 with or after 6.2.
https://bugreports.qt.io/browse/QTBUG-63235

5 years agodelete FAKE_LANGUAGE_MENU code. (#681)
tsteven4 [Fri, 5 Feb 2021 16:48:33 +0000 (09:48 -0700)]
delete FAKE_LANGUAGE_MENU code. (#681)

This code hadn't compiled for a while, and is no longer necessary
to test translations.

5 years agoreplace obsolete and overloaded QProcess signal error(QProcess::ProcessError error...
tsteven4 [Thu, 4 Feb 2021 22:56:38 +0000 (15:56 -0700)]
replace obsolete and overloaded QProcess signal error(QProcess::ProcessError error) (#679)

with the recommended replacement, QProcess signal errorOccurred(QProcess::ProcessError error).
It seems this should have caused an issue in Qt6, but we hadn't noticed it yet.

5 years agofix deprecated-copy waring. (#675)
tsteven4 [Tue, 2 Feb 2021 13:07:41 +0000 (06:07 -0700)]
fix deprecated-copy waring. (#675)

This fixes
"formatload.cc:127:40: warning: implicitly-declared
 ‘Format& Format::operator=(const Format&)’ is deprecated [-Wdeprecated-copy]"

Use default member initializers for FormatOption and Format classes.
This allows the use of the default constructor and simplifies the
creation of parameterized constructors.

Use implicit copy constructor for FormatOption and Format classes.
Note the previous copy constructor for the Format class was not
really a copy constructor, it re-initialized readUseCount and writeUseCount.
This was unnecessary.  The only place we want to use the copy constructor is
in FormatLoad::getFormats and the instances to be copied have just been
created with one of the Format constructors so the use counts will be zero.
There are plenty of other opportunities where Qt might detach formatList_
and use the copy constructor.  Most of these cases are read accesses and
improved const correctness could eliminate the possiblity, i.e. using
QList::at instead of QList::operator[].  A few of these are modifying an
item on the formatList_, and Qt will insist the copy constructor is available
at compile time even if it is never used at run time.

5 years agorefactoring for cppcheck "The scope of the variable can be reduced" (#677)
tsteven4 [Mon, 1 Feb 2021 18:40:49 +0000 (11:40 -0700)]
refactoring for cppcheck "The scope of the variable can be reduced" (#677)

* refactoring for cppcheck "The scope of the variable can be reduced"

The c++17 "If Statement with Initializer" often are useful in resovling
these.

* more scope reduction.

* and another.

5 years agoMerge pull request #676 from tsteven4/moretidy
tsteven4 [Sun, 31 Jan 2021 19:40:07 +0000 (12:40 -0700)]
Merge pull request #676 from tsteven4/moretidy

clang tidy fixes

5 years agoqt6 compatibility changes. (#674)
tsteven4 [Sat, 30 Jan 2021 23:27:27 +0000 (16:27 -0700)]
qt6 compatibility changes. (#674)

QDateTime::toTime_t has been obsolete for a long time, it is gone
in Qt6.

5 years agotidy additional readability-convert-member-functions-to-static
tsteven4 [Sat, 30 Jan 2021 13:28:28 +0000 (06:28 -0700)]
tidy additional readability-convert-member-functions-to-static

5 years agotidy modernize-use-auto
tsteven4 [Fri, 29 Jan 2021 15:20:36 +0000 (08:20 -0700)]
tidy modernize-use-auto

5 years agotidy modernize-deprecated-headers
tsteven4 [Fri, 29 Jan 2021 14:51:20 +0000 (07:51 -0700)]
tidy modernize-deprecated-headers

5 years agoMerge pull request #673 from tsteven4/tidyupagain
tsteven4 [Thu, 28 Jan 2021 20:58:58 +0000 (13:58 -0700)]
Merge pull request #673 from tsteven4/tidyupagain

clang tidy readability fixes

5 years agotidy readability-qualified-auto
tsteven4 [Thu, 28 Jan 2021 18:08:14 +0000 (11:08 -0700)]
tidy readability-qualified-auto

I also ran these through astyle with our astylerc file to match
our standard.  This resulted in significant reformatting in geojson.cc

5 years agotidy readability-const-return-type
tsteven4 [Thu, 28 Jan 2021 16:18:37 +0000 (09:18 -0700)]
tidy readability-const-return-type

with a little whitespace cleanup by hand and removal of an
unused deprecated function.

5 years agotidy readability-convert-member-functions-to-static
tsteven4 [Thu, 28 Jan 2021 15:37:13 +0000 (08:37 -0700)]
tidy readability-convert-member-functions-to-static

this took a little bit of hand editing for whitespace and
one change that had to be reverted wrt a Functor signature.

5 years agotrust Qt to strip out characters illegal in xml. (#671)
tsteven4 [Wed, 27 Jan 2021 23:09:30 +0000 (16:09 -0700)]
trust Qt to strip out characters illegal in xml. (#671)

this was added in Qt 5.11.0.

5 years agoclang tidy readability-make-member-function-const
tsteven4 [Wed, 27 Jan 2021 19:18:06 +0000 (12:18 -0700)]
clang tidy readability-make-member-function-const

5 years agoUpdate standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)
tsteven4 [Wed, 27 Jan 2021 19:01:41 +0000 (12:01 -0700)]
Update standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)

* raise minimum standards to c++17, Qt 5.12, MSVC 2017.

* avoid std::optional::value which didn't work until macOS 10.14.

* avoid std::optional::value which didn't work until macOS 10.14.

* update runner for codeql so we have Qt >= 5.12

* try harder to get codeql working with newer Qt.

* use c++17 fallthrough attribute.

* use c++17 'if constexpr' as suggested by resharper.

* catch mkicondoc up with c++17

5 years agocleanup CMakeLists.txt a bit. (#669)
tsteven4 [Tue, 26 Jan 2021 18:55:59 +0000 (11:55 -0700)]
cleanup CMakeLists.txt a bit. (#669)

add support for cmake, ninja to Docker images.
get git to ignore various generated files.

5 years agofix some codeql warnings. (#663)
tsteven4 [Tue, 26 Jan 2021 17:58:32 +0000 (10:58 -0700)]
fix some codeql warnings. (#663)

* fix some codeql warnings.

* use c++11 z length modifier in format strings with size_t format arguments.

* don't attempt to upload coverage if token is null or not set.

with the github action flow the CODACY_PROJECT_TOKEN is set and null
for foreign pull requests that don't have access to the secrets.

* double protect token

5 years agoadd github actions for CI. (#662)
tsteven4 [Tue, 26 Jan 2021 13:42:40 +0000 (06:42 -0700)]
add github actions for CI. (#662)

* add github actions for CI.

* fix shellcheck issues in ci_install_windows.sh

* generalize windows ci build support

cleanup powershell scripts with Invoke-ScriptAnalyzer, including use of
"-Settings CodeFormatting".

create staging directory for windows installer creation.
It is difficult to exclude all the files in the build directory that we don't
want to distribute as the files are a function of the build system.

add windows cmake build.

5 years agocatch windows installer up with renamed vc redistributable installer. (#667)
tsteven4 [Sat, 23 Jan 2021 04:22:55 +0000 (21:22 -0700)]
catch windows installer up with renamed vc redistributable installer. (#667)

5 years agocatch cmake up (#666)
tsteven4 [Wed, 20 Jan 2021 16:51:45 +0000 (09:51 -0700)]
catch cmake up (#666)

with recent changes to *.pro files, and
some lost changes to get windows rc files working.

5 years agoRemove dead formats: alan, an1, netstumbler, naviguide.
Robert Lipe [Thu, 14 Jan 2021 07:01:24 +0000 (01:01 -0600)]
Remove dead formats: alan, an1, netstumbler, naviguide.

As discussed in https://github.com/gpsbabel/gpsbabel/issues/659

5 years agoMerge pull request #660 from gpsbabel/win64_only
tsteven4 [Thu, 31 Dec 2020 15:21:53 +0000 (08:21 -0700)]
Merge pull request #660 from gpsbabel/win64_only

switch windows release build from 32 bit to 64 bit (only).

5 years agoMerge pull request #658 from gpsbabel/date_demo
Robert Lipe [Wed, 30 Dec 2020 18:46:42 +0000 (12:46 -0600)]
Merge pull request #658 from gpsbabel/date_demo

Modernize time handling in compegps, globalsat, hiketech, jtr, magpro…

5 years agoMerge pull request #657 from gpsbabel/improve-errors
Robert Lipe [Tue, 29 Dec 2020 21:03:36 +0000 (15:03 -0600)]
Merge pull request #657 from gpsbabel/improve-errors

Improve errors by displaying full filename paths on open failures.

5 years agoturn off selected msvc warnings for c compiler.
tsteven4 [Tue, 29 Dec 2020 20:31:54 +0000 (13:31 -0700)]
turn off selected msvc warnings for c compiler.

5 years agoswitch windows release build from 32 bit to 64 bit (only).
tsteven4 [Tue, 29 Dec 2020 19:09:10 +0000 (12:09 -0700)]
switch windows release build from 32 bit to 64 bit (only).

5 years agoModernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.
Robert Lipe [Sun, 27 Dec 2020 09:13:10 +0000 (03:13 -0600)]
Modernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.

5 years agoUnfix warning in util.cc since it breaks builds
Robert Lipe [Sun, 27 Dec 2020 06:19:41 +0000 (00:19 -0600)]
Unfix warning in util.cc since it breaks builds

...on Windows and I don't feel like wrangling in an upgrade.

5 years agoFix a dumb warning in garmin_txt.cc.
Robert Lipe [Sun, 27 Dec 2020 05:23:27 +0000 (23:23 -0600)]
Fix a dumb warning in garmin_txt.cc.

5 years agoUse full path name when displaying errors opening files for reads and writes.
Robert Lipe [Sun, 27 Dec 2020 05:15:06 +0000 (23:15 -0600)]
Use full path name when displaying errors opening files for reads and writes.

This doesn't work for every place where we issue fatal errors, but it gets
the high value formats.

5 years agoMerge pull request #647 from gpsbabel/robertlipe-patch-1
tsteven4 [Mon, 21 Dec 2020 15:18:41 +0000 (08:18 -0700)]
Merge pull request #647 from gpsbabel/robertlipe-patch-1

ozi: don't deinit a write stream if we don't have one.

5 years agoadd ozi track write test cases
tsteven4 [Sun, 20 Dec 2020 19:46:01 +0000 (12:46 -0700)]
add ozi track write test cases

5 years agobackward compatible changes for Qt6 (#656)
tsteven4 [Tue, 15 Dec 2020 21:37:55 +0000 (14:37 -0700)]
backward compatible changes for Qt6 (#656)

* Avoid implicit conversion of int to QChar.

In Qt6 the constructor QChar(int code) is explicit by default.

* update codacy coverage reporter

* move coverage generation to focal.

* use binary codacy coverage reporter

5 years agomove Qt 5.15 build to 5.15.2. (#652)
tsteven4 [Fri, 20 Nov 2020 23:37:41 +0000 (16:37 -0700)]
move Qt 5.15 build to 5.15.2. (#652)

5 years agoupdate mac, linux docker qtio builds to 5.12.10. (#650)
tsteven4 [Tue, 10 Nov 2020 20:31:00 +0000 (13:31 -0700)]
update mac, linux docker qtio builds to 5.12.10. (#650)

* update mac Qt 5.12 build to 5.12.10.

* update qtio docker build to qt 5.12.10

5 years agofix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)
tsteven4 [Sun, 8 Nov 2020 17:51:41 +0000 (10:51 -0700)]
fix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)

5 years agoCreate codeql-analysis.yml (#648)
tsteven4 [Sun, 8 Nov 2020 16:26:23 +0000 (09:26 -0700)]
Create codeql-analysis.yml (#648)

* Create codeql-analysis.yml

* Update codeql-analysis.yml

5 years agoozi: don't deinit a write stream if we don't have one.
Robert Lipe [Tue, 27 Oct 2020 08:28:03 +0000 (03:28 -0500)]
ozi: don't deinit a write stream if we don't have one.

We can get into close() with a null stream_ TextStream. I think it has to do with ozi_openfile() reopening a file with a new name to match an extension of a certain type so it's renaming a file that hasn't been written. See issue #646

5 years agoupdate build to Qt 5.15.1 from 5.15.0 (#642)
tsteven4 [Thu, 10 Sep 2020 16:52:03 +0000 (10:52 -0600)]
update build to Qt 5.15.1 from 5.15.0 (#642)

5 years agoeliminate duplicate ignrando test. (#641)
tsteven4 [Tue, 8 Sep 2020 16:32:45 +0000 (10:32 -0600)]
eliminate duplicate ignrando test. (#641)

5 years agobackward compatible changes for Qt6. (#640)
tsteven4 [Sun, 30 Aug 2020 20:26:54 +0000 (14:26 -0600)]
backward compatible changes for Qt6. (#640)

* backward compatible changes for Qt6.

This is mostly QRegExp -> QRegularExpression.
Some QRegExp usage was was replaced by QString::trimmed.
There is also a QNetworkRequest redirect attribute change that is backward
compatible to Qt5.9.

* eliminate usage of unnecessary regular expressions.

* bring serial_unix into Qt6 compliance.

QSet::toList is gone, QSet::values is identical.
qSort is deprecated.

5 years agoadd ability to disable map preview in GUI (#635)
tsteven4 [Sat, 29 Aug 2020 19:37:14 +0000 (13:37 -0600)]
add ability to disable map preview in GUI (#635)

* add CONFIG option to disable map preview feature.

* additional excludes for disabled map preview

5 years agoFix potential segmentation faults with exif. (#639)
tsteven4 [Fri, 28 Aug 2020 11:50:07 +0000 (05:50 -0600)]
Fix potential segmentation faults with exif. (#639)

1. A pointer exif_app_ to an ExifApp on QList<ExifApp> exif_apps was saved.
After this the list was modified.  This can lead to the saved pointer becoming
invalid.
2. The ExifApp structure had a dtor, but no other special functions, i.e.  it
violated the rule of 3 and the rule of 5.  Operations on QList<ExifApp> may
cause an ExifApp on the list to be copied or destroyed.  If an ExifApp is
destroyed, then the ExifApp dtor would close the files, even though there could
be a copy of the ExifApp expecting the files still to be open.

This scenerio occured with Qt6, causing segmentation faults in exif.test.

5 years agofix hiketech datetime bug, prepare for toTime_t override (#638)
tsteven4 [Thu, 27 Aug 2020 18:05:37 +0000 (12:05 -0600)]
fix hiketech datetime bug, prepare for toTime_t override (#638)

* correct hiketech written time values.

the mystery previously noted in the code was due to the use of the %I format
specifier which prints out the hour using a 12 hour clock.

note that it is easy to see the times in the reference files were wrong.  the
times in the first reference file, expertgpx.gpx, are in UTC.  This is always
true for gpx, and is indicated as well by the Z.  the times in the hiketech file
appear in a utc element, so they must be in UTC as well.

this eliminates the usage of QDateTime::toTime_t which is obsolete.

* elimnate remaining uses of obsolete QDateTime::toTime_t

This sounds better than it is, we added uses of gpsbabel::DateTime::toTime_t.
But we control that and can add our own toTime_t.

5 years agoremove unintentional collision with errno. (#636)
tsteven4 [Tue, 25 Aug 2020 20:48:21 +0000 (14:48 -0600)]
remove unintentional collision with errno. (#636)

this caused compiler failures with gnu++1z.

5 years agomore gperf removal (#634)
tsteven4 [Mon, 24 Aug 2020 17:45:42 +0000 (11:45 -0600)]
more gperf removal (#634)

* more gperf removal.

This also makes the xcsv_token table private.

* restore functionality of style file options

and avoid unnecessary enum conversions.

* expicitly pass default value for xcsv_tokens value lookup.

5 years agomerge selected upstream changes for upload.sh (#633)
tsteven4 [Mon, 24 Aug 2020 16:58:30 +0000 (10:58 -0600)]
merge selected upstream changes for upload.sh (#633)

this restores uploads for PRs, but to transfersh.com instead of transfer.sh.

add atrifactory deploy script to upload Qt images.

5 years agoAllow client retry on a redirect of an upgrade check.
Robert Lipe [Mon, 24 Aug 2020 06:30:48 +0000 (01:30 -0500)]
Allow client retry on a redirect of an upgrade check.
Not in this CL, server side change to NOT force an http->https upgrade
on this one URL.

5 years agoMerge branch 'master' of https://github.com/gpsbabel/gpsbabel
Robert Lipe [Mon, 24 Aug 2020 04:37:15 +0000 (23:37 -0500)]
Merge branch 'master' of https://github.com/gpsbabel/gpsbabel

5 years agoRemove dependency on gperf. (#631)
GPSBabel [Mon, 24 Aug 2020 03:15:29 +0000 (22:15 -0500)]
Remove dependency on gperf. (#631)

* Remove dependency on gperf.

There may be more "computer sciency" ways to do this, but let's start here.
Smallest cut possible for removal. Throwing this into CI to plan for actual
removal.

It seems like xcsv_tokens should be more const-able (constexpr?). If necessary,
we can defer this initialization from a global created at startup to being
only inflated when needed. Let's see.

* Bludgeon in temporary better handling for LAT_10E and friends.

* Prepare to die!

* Drop xcsv_tokens.cc and xcsv_tokens.gperf.

* Drop xcsv_tokens.in.

* Remove Steven's shiny new code to run gperf.

Collision with trunk. Oops.

* Pick up xcsv.cc, xcsv.h which were dropped.

5 years agoMigrate some RegExs to QRegularExpression. (#632)
tsteven4 [Sat, 22 Aug 2020 11:56:53 +0000 (05:56 -0600)]
Migrate some RegExs to QRegularExpression. (#632)

QRegExp will be/is deprecated.

5 years agoadd fedora CI build, drop xenial (#630)
tsteven4 [Fri, 14 Aug 2020 22:47:24 +0000 (16:47 -0600)]
add fedora CI build, drop xenial (#630)

* add fedora CI build

* drop travis xenial build.

5 years agocompile in gpsbabel translations and map on non mac unix distribution… (#622)
tsteven4 [Fri, 14 Aug 2020 22:41:03 +0000 (16:41 -0600)]
compile in gpsbabel translations and map on non mac unix distribution… (#622)

* compile in gpsbabel translations and map on non mac unix distributions by default.

This eliminates the need to install gpsbabelfe_*.qm, gpsbabel_*.qm and
gmapbase.html on the system.
Note that the Qt supplied translations must still be installed on the system.
The Qt translations may be in a package like qttranslations5-l10n or
qt5-qttranslations.

* simplify optional resources using std methods.

* discuss dependencies in INSTALL.

5 years agoadd some explicit docbook ids (#629)
tsteven4 [Fri, 14 Aug 2020 19:57:32 +0000 (13:57 -0600)]
add some explicit docbook ids (#629)

this makes the generated html more reproducible as random ids
aren't generated.

5 years agoremove autotools (#626)
tsteven4 [Tue, 11 Aug 2020 18:23:18 +0000 (12:23 -0600)]
remove autotools (#626)

5 years agoadd macos qt 5.15.0 build with artifactory image. (#624)
tsteven4 [Tue, 11 Aug 2020 16:25:33 +0000 (10:25 -0600)]
add macos qt 5.15.0 build with artifactory image. (#624)

5 years agomove linux CI from configure to qmake. (#613)
tsteven4 [Fri, 7 Aug 2020 18:55:09 +0000 (12:55 -0600)]
move linux CI from configure to qmake. (#613)

- Add recipe for internal_styles.cc, xcsv_tokens.gperf, gui, unix-gui, toolinfo to GPSBabel.pro.
- Add support for text substitution in setup.iss and gbversion.h to GPSBabel.pro.
- fix qmake warnings from "qmake -Wall".
- split recipes for documents into scripts.
- shellcheck fixes for fixdoc, mkcapabilities.
- parallel build for coverage.
- add INSTALL file with build instructions.
- sort document targets into ones for general consumption (gpsbabel.html, gpsbabel.pdf) and one to support www.gpsbabel.org (now gpsbabel.org instead of index.html).

5 years agofix i386 regression error with engima. (#620)
tsteven4 [Fri, 7 Aug 2020 17:29:22 +0000 (11:29 -0600)]
fix i386 regression error with engima. (#620)

this was motivated by the test failure seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0

5 years agouse Qt endian detetion. (#619)
tsteven4 [Fri, 7 Aug 2020 13:38:47 +0000 (07:38 -0600)]
use Qt endian detetion. (#619)

This frees us from AC_C_BIGENDIAN which conditionally defined WORDS_BIGENDIAN.
The defintion of WORDS_BIGENDIAN was and is not handled by GPSBabel.pro.

5 years agofix endianness/packing issues with energympro, globalsat_sport. (#618)
tsteven4 [Fri, 7 Aug 2020 13:34:42 +0000 (07:34 -0600)]
fix endianness/packing issues with energympro, globalsat_sport. (#618)

this was motivated by test failures seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=s390x&ver=1.7.0%2Bds-3&stamp=1594393020&raw=0